// 转成大驼峰命名方式 getElementById

const foo = "get-element-by-id";

function combo(str) {
  const arr = str.split("-");
  for (let i = 1; i < arr.length; i++) {
    arr[i] = arr[i].charAt(0).toUpperCase() + arr[i].substring(1, arr[i].length);
  }
  console.log(arr.join(""));
}

combo(foo);
